package jsu.hx.work2.controller;

import jsu.hx.work2.mapper.UserMapper;
import jsu.hx.work2.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/chapter03")
public class UsersController {
    @Autowired
    private UserMapper userMapper;
    @GetMapping("/user")
    public List<Users> getAllUser(){
        return userMapper.selectList(null);
    }
}
